package cn.iocoder.yudao.module.aiposter.config;

import cn.iocoder.yudao.module.aiposter.queue.TaskToolExecutor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ExecutorPoolConfig {

    @Bean(initMethod = "init", destroyMethod = "destory")
    public TaskToolExecutor drawPosterExecutor(){
        TaskToolExecutor drawPosterExecutor = new TaskToolExecutor();
        drawPosterExecutor.setName("drawPostExecutor");
        drawPosterExecutor.setCoreSize(20);
        drawPosterExecutor.setMaxSize(32);
        drawPosterExecutor.setQueueSize(1024);
        return drawPosterExecutor;
    }
}
